<?php

/**
 * Classe prenant en charge les requetes SQL de type [REPLACE]
 *
 * @category   McCube
 * @package    Db
 * @author     Leiha Sellier <leiha.sellier@gmail.com>
 * @license    http://creativecommons.org/licenses/by/3.0/  CC BY 3.0
 * @link       http://code.google.com/p/mechanics-cubes/
 * @see        http://www.php.net/manual/book.pdo.php
 */
class McCube_Db_Query_Replace extends McCube_Db_Query_Insert{

    public function build(){
        $q  = 'REPLACE INTO '.$this->_table
            .' ('.implode(' , ', $this->_fields).')'
            .' VALUES '.implode(' , ', $this->_values)
        ;

        return $q.';';
    }

}